package com.game.mongo;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/7/5.
 */
public class UserField {
	public static String userId = "userId";
	public static String nickName = "nickName";
	public static String loginName = "loginName";
	public static String password = "password";
	public static String IMEI = "IMEI";
	public static String coin = "coin";
	public static String maxCoin = "maxCoin";
	public static String yuanbao = "yuanbao";
	public static String maxYuanbao = "maxYuanbao";
	public static String photoUrl = "photoUrl";
	public static String createTime = "createTime";
	public static String lastLoginTime = "lastLoginTime";
	public static String gameDataMap = "gameDataMap";

	public static class GameData {
		public static String level = "level";
		public static String levelExp = "levelExp";
		public static String vipLevel = "vipLevel";
		public static String vipLevelExp = "vipLevelExp";
	}

	public static class JinHuaGameData {
		public static String meili = "meili";
	}

	public static class JJZLGameData {
		public static String power = "power";
	}


	public static void main(String[] args) {
		List<Class> all = new ArrayList<Class>();
		all.add(User.class);
		all.add(GameData.class);
		all.add(JinHuaGameData.class);
		all.add(JJZLGameData.class);
		for (Class aClass : all) {
			if (aClass != User.class) {
				System.out.println(String.format("public static class %s{", aClass.getSimpleName()));
			}
			Field[] fields = aClass.getDeclaredFields();
			for (Field field : fields) {
				String name = field.getName();
				String msg = String.format("public static String %s = \"%s\";", name, name);
				System.out.println(msg);
			}
			if (aClass != User.class) {
				System.out.println(String.format("}"));
			}
		}

	}
}
